<%@ page import="java.util.List" %>
<%@ page import="entity.User" %><%--
  Created by IntelliJ IDEA.
  User: ASUS
  Date: 2021/11/30
  Time: 15:35
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
  <head>
    <title>$Title$</title>
  </head>
  <body>
  <table>
      <tr>
        <th>编号</th>
        <th>姓名</th>
        <th>成绩</th>
        <th>操作</th>
      </tr>
      <br/>

      <c:forEach items="${list}" var="user">
          <tr>
              <td>${user.id}</td>
              <td>${user.name}</td>
              <td>${user.score}</td>
              <td>
                  <a href="/user?method=delete&id=${user.id}">删除</a>
                  <a href="/user?method=replace&id=${user.id}">修改</a>
              </td>
          </tr>
          <br/>
      </c:forEach>
      <th>
          <a href="add.jsp">添加数据</a>
      </th>
  </table>
  </body>
</html>
